const Net = require('../../common.js')
Page({
  data: {
    list:[],
    info:{}
  },
  onLoad: function (options) {
    var _this = this
    _this.onPageInfo()
    _this.onGoodsInfoList()
  },
  onPageInfo() {
    var storeId = wx.getStorageSync('store')
    Net.link('v1/shop', {
      id: storeId
    }, function (res) {
      Net.data({
        info: res.data.data,
      })
    }, 'GET')
  },
  onGoodsInfoList() {
    var storeId = wx.getStorageSync('store')
    Net.link('v1/goodsList', {
      member_mall_id: storeId,
      now_page:1
    }, function (res) {
      Net.data({
        list: res.data.data.list
      })
    }, 'GET')
  },
  onReady: function () {},
  onShow: function () {},
  onHide: function () {},
  onUnload: function () {},
  onPullDownRefresh: function () {},
  onReachBottom: function () {},
  onShareAppMessage: function () {}
})